package com.lnj.community.utiles;

import com.lnj.community.dao.entity.User;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

public class HostHolder {
    public static  ThreadLocal<User> users = new ThreadLocal<>();
    public static void setUser(User user) {
        users.set(user);
    }
    public static User getUser() {
        return users.get();
    }
    public static void clear() {
        users.remove();
    }
}
